 package nc.ui.bd.mes.dmoys.view;
 
 import java.awt.Color;
 import java.awt.Graphics;
 import nc.ui.pub.beans.UIButton;
 import nc.ui.pub.beans.UIPanel;
 
 
 
 
 
 
 
 public class ButtonPanel
   extends UIPanel
 {
   private UIButton[] bos = null;
   
 
   private ButtonFlowLayout bolayout = null;
   
 
 
 
   private boolean isTop = false;
   
 
 
 
   public static final int HORIZONTAL_SHOW = 0;
   
 
 
 
   public static final int VERTICAL_SHOW = 1;
   
 
 
 
   private int boshowflag = 0;
   
 
 
 
   private static final int DEFAULT_BACDGROUND_COLOR = 15592941;
   
 
 
 
 
   public static void main(String[] args) {}
   
 
 
 
   @Deprecated
   public ButtonPanel(UIButton[] bos)
   {
     this(bos, 0);
   }
   
 
 
 
 
 
 
 
   @Deprecated
   public ButtonPanel(UIButton[] bos, int boshowflag)
   {
     this.boshowflag = boshowflag;
     this.bos = bos;
     init();
   }
   
 
 
 
 
 
 
 
 
 
   public ButtonPanel(UIButton[] bos, int boboshowflag, boolean isTop)
   {
     boshowflag = boboshowflag;
     this.bos = bos;
     this.isTop = isTop;
     init();
   }
   
 
 
 
 
   private ButtonFlowLayout getButtonFlowLayout()
   {
     if (bolayout == null) {
       bolayout = new ButtonFlowLayout(boshowflag, isTop);
     }
     return bolayout;
   }
   
 
 
 
 
 
 
 
   private void init()
   {
     setLayout(getButtonFlowLayout());
     setBackground(new Color(15592941));
     if (bos != null) {
       adjustButtonOrder();
       for (int i = 0; i < bos.length; i++) {
         add(bos[i], bos[i].getName());
       }
     }
   }
   
 
 
   private void adjustButtonOrder()
   {
     bos = ButtonUtils.sortButtons(bos);
   }
   
   public void paint(Graphics g)
   {
     super.paint(g);
   }
 }

